<?php
namespace Avos;


class AVECSponser extends AVRestClient{

    public function __construct()
    {
        parent::__construct();
    }

    public function __set($name,$value)
    {
        if(empty($name))
        {
            $this->data[$name] = $value;
        }
    }

    public function array_set($data)
    {
        if(is_array($data))
        {
            foreach($data as $k=>$v)
            {
                $this->data[$k] = $v;
            }
        }else{
            $this->throwError('不能给array_set传入非数组参数！！！');
        }
    }

    public function get($objectId){
        if($objectId != ''){
            $request = $this->request(array(
                    'method' => 'GET',
                    'requestUrl' => 'classes/'.$objectId,
                ));

            return $request;

        }
        else{
            $this->throwError('objectId is required for the get method');
        }

    }


} 